home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / PROGTOOL / TDOOR201.ZIP;1 / TRIDOOR.DOC < prev    next >
Encoding:
Text File  |  1994-02-04  |  28.8 KB  |  1,387 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.                                      TriDoor
  34.                                    Version 2.0
  35.                        Copyright (c) 1992-1994 By TriSoft
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.      TriDoor                                                              i
  77.  
  78.                                 COPYRIGHT NOTICE
  79.                                 ----------------
  80.  
  81.      TriDoor is a copyrighted program being distributed under the shareware
  82.      concept.  As such you may use TriDoor for  a period of 30 days without
  83.      registering the software.   After  the 30 day  evaluation period,  you
  84.      must register  your copy of  TriDoor or  you will be  in violation  of
  85.      United States and International copyright laws.
  86.  
  87.      As  a shareware program, TriDoor  may be freely  distributed through a
  88.      BBS.   Shareware distributors may distribute copies of TriDoor on disk
  89.      for a modest disk duplication charge not to exceed $6 per disk.
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.      TriDoor                                                             ii
  145.  
  146.                                     WARRANTY
  147.                                     --------
  148.  
  149.      TriDoor is distributed without warranty.  In no event will  TriSoft be
  150.      liable  to  you  for damages,  including  any  loss  of profits,  lost
  151.      savings, or other  incidental or consequential damages  arising out of
  152.      your use of  or inability to use  the program, even  if TriSoft or  an
  153.      authorized representative has been advised of the possibility of  such
  154.      damages.  TriSoft will not  be liable for any such claim by  any other
  155.      party.
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.      TriDoor                                                            iii
  213.  
  214.                                 TABLE OF CONTENTS
  215.                                 -----------------
  216.  
  217.  
  218.      INTRODUCTION  . . . . . . . . . . . . . . . . . . . . . . . . . . .  1
  219.  
  220.      USING TRIDOOR . . . . . . . . . . . . . . . . . . . . . . . . . . .  2
  221.  
  222.      RUNNING A TRIDOOR DOOR  . . . . . . . . . . . . . . . . . . . . . .  3
  223.  
  224.      SPECIAL KEYS  . . . . . . . . . . . . . . . . . . . . . . . . . . .  4
  225.  
  226.      THE TRIDOOR VARIABLES . . . . . . . . . . . . . . . . . . . . . . .  5
  227.           TDAlias  . . . . . . . . . . . . . . . . . . . . . . . . . . .  5
  228.           TDAnsiColor  . . . . . . . . . . . . . . . . . . . . . . . . .  5
  229.           TDBaudRate . . . . . . . . . . . . . . . . . . . . . . . . . .  5
  230.           TDBBSName  . . . . . . . . . . . . . . . . . . . . . . . . . .  5
  231.           TDCityState  . . . . . . . . . . . . . . . . . . . . . . . . .  5
  232.           TDDoorName . . . . . . . . . . . . . . . . . . . . . . . . . .  5
  233.           TDDropToDOS  . . . . . . . . . . . . . . . . . . . . . . . . .  5
  234.           TDErrorCorrecting  . . . . . . . . . . . . . . . . . . . . . .  6
  235.           TDNode . . . . . . . . . . . . . . . . . . . . . . . . . . . .  6
  236.           TDLockedBaudRate . . . . . . . . . . . . . . . . . . . . . . .  6
  237.           TDMinutesLeft  . . . . . . . . . . . . . . . . . . . . . . . .  6
  238.           TDNonStandardIRQ . . . . . . . . . . . . . . . . . . . . . . .  6
  239.           TDPhoneNumber  . . . . . . . . . . . . . . . . . . . . . . . .  6
  240.           TDSecurityLevel  . . . . . . . . . . . . . . . . . . . . . . .  6
  241.           TDSerialPort . . . . . . . . . . . . . . . . . . . . . . . . .  6
  242.           TDSysopName  . . . . . . . . . . . . . . . . . . . . . . . . .  7
  243.           TDUserFirstName  . . . . . . . . . . . . . . . . . . . . . . .  7
  244.           TDUserName . . . . . . . . . . . . . . . . . . . . . . . . . .  7
  245.  
  246.      THE TRIDOOR FUNCTIONS . . . . . . . . . . . . . . . . . . . . . . .  8
  247.           TDBeepRemote . . . . . . . . . . . . . . . . . . . . . . . . .  8
  248.           TDClrScr . . . . . . . . . . . . . . . . . . . . . . . . . . .  8
  249.           TDDetectANSI . . . . . . . . . . . . . . . . . . . . . . . . .  8
  250.           TDDetectRIPScrip . . . . . . . . . . . . . . . . . . . . . . .  8
  251.           TDDisplayFile  . . . . . . . . . . . . . . . . . . . . . . . .  8
  252.           TDDisplayBreakableFile . . . . . . . . . . . . . . . . . . . .  8
  253.           TDGetBackground  . . . . . . . . . . . . . . . . . . . . . . .  8
  254.           TDGetch  . . . . . . . . . . . . . . . . . . . . . . . . . . .  9
  255.           TDGetForeground  . . . . . . . . . . . . . . . . . . . . . . .  9
  256.           TDGets . . . . . . . . . . . . . . . . . . . . . . . . . . . .  9
  257.           TDGotoXY . . . . . . . . . . . . . . . . . . . . . . . . . . .  9
  258.           TDInitialize . . . . . . . . . . . . . . . . . . . . . . . . .  9
  259.           TDKeyPressed . . . . . . . . . . . . . . . . . . . . . . . . .  9
  260.           TDHangUp . . . . . . . . . . . . . . . . . . . . . . . . . . .  9
  261.           TDPrintf . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
  262.           TDPutch  . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
  263.           TDPuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
  264.           TDSetColor . . . . . . . . . . . . . . . . . . . . . . . . . . 10
  265.           TDTimeLeft . . . . . . . . . . . . . . . . . . . . . . . . . . 11
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.      TriDoor                                                             iv
  281.  
  282.           TDTimeOn . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
  283.  
  284.      ADVANCED SERIAL COMMUNICATIONS ROUTINES . . . . . . . . . . . . . . 12
  285.           TDCommClose  . . . . . . . . . . . . . . . . . . . . . . . . . 12
  286.           TDCommKeyPressed . . . . . . . . . . . . . . . . . . . . . . . 12
  287.           TDCommModemString  . . . . . . . . . . . . . . . . . . . . . . 12
  288.           TDCommOpen . . . . . . . . . . . . . . . . . . . . . . . . . . 12
  289.           TDCommPutch  . . . . . . . . . . . . . . . . . . . . . . . . . 13
  290.           TDCommPuts . . . . . . . . . . . . . . . . . . . . . . . . . . 13
  291.           TDCommSetBaudRate  . . . . . . . . . . . . . . . . . . . . . . 13
  292.           TDCommSetDataFormat  . . . . . . . . . . . . . . . . . . . . . 13
  293.           TDCommSetDTR . . . . . . . . . . . . . . . . . . . . . . . . . 13
  294.           TDCommSetFIFO  . . . . . . . . . . . . . . . . . . . . . . . . 13
  295.           TDCommSetPort  . . . . . . . . . . . . . . . . . . . . . . . . 14
  296.  
  297.      SUPPORT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
  298.  
  299.      REGISTRATION  . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.      TriDoor                                                              1
  349.  
  350.                                   INTRODUCTION
  351.                                   ------------
  352.  
  353.      TriDoor  is  a comprehensive  set  of  Borland  C++, Microsoft  C/C++,
  354.      Symantec C++, Turbo C++,  and Watcom C/C++ (the 16-bit  version of the
  355.      compiler  only) functions  designed  to enable  programmers to  easily
  356.      write  doors for  BBSes.   The following  are some  of TriDoor's  many
  357.      features:
  358.  
  359.           Assembly  language serial input/output  routines for maximum
  360.           speed.
  361.  
  362.           Fully supports  high speed modems: 16550  FIFO buffering and
  363.           locked serial ports.
  364.  
  365.           Built in ANSI terminal  emulator.  No need to  have ANSI.SYS
  366.           loaded in memory.
  367.  
  368.           Optional detection of RIPScrip graphics.
  369.  
  370.           TriDoor is DesqView aware.
  371.  
  372.           Supports all  of the  most popular  door data file  formats:
  373.           TriBBS, PCBoard,  GAP (DOOR.SYS), Spitfire,  WildCat!, RBBS,
  374.           and WWIV.  Thus,  a door built around TriDoor  is compatible
  375.           with a wide range of BBS software.
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408.  
  409.  
  410.  
  411.  
  412.  
  413.  
  414.  
  415.  
  416.      TriDoor                                                              2
  417.  
  418.                                   USING TRIDOOR
  419.                                   -------------
  420.  
  421.      TriDoor is  supplied  with the  following  shareware versions  of  the
  422.      TriDoor library.
  423.  
  424.      ======================================================================
  425.      Compiler            Library
  426.      ----------------------------------------------------------------------
  427.      Borland C++         BCTDOOR.LIB
  428.      Microsoft C/C++     MCTDOOR.LIB
  429.      Symantec C++        SCTDOOR.LIB
  430.      Turbo C++           TCTDOOR.LIB
  431.      Watcom C/C++        WCTDOOR.LIB
  432.      ======================================================================
  433.  
  434.      Because  TriDoor  comes supplied  as a  library  it can  be seamlessly
  435.      integrated with your door program by  simply including the name of the
  436.      library either in  the door program's project  file or in the  command
  437.      line that  you use to  compile the program.   Additionally, you should
  438.      include  TriDoor's header file (TRIDOOR.H) in  all your door program's
  439.      source  code  files.   Please  note  that  the  TriDoor libraries  are
  440.      compiled  using the large memory  model; therefore, your door programs
  441.      much be compiled using the large memory model too.
  442.  
  443.      To initialize the TriDoor  door driver routines, you must  always call
  444.      TriDoor's TDInitialize function  at the  start of your  program.   The
  445.      TDInitialize function  must be  called before  your program  makes any
  446.      calls to any of TriDoor's other functions.
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470.  
  471.  
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484.      TriDoor                                                              3
  485.  
  486.                              RUNNING A TRIDOOR DOOR
  487.                              ----------------------
  488.  
  489.      A TriDoor-based  door program is run by  entering a command similar to
  490.      the following:
  491.       
  492.      door config nonstandardirq
  493.  
  494.      In the  above command line, "door" is the name of your door's EXE file
  495.      and the "config"  parameter is  the name of  the door's  configuration
  496.      file.  The configuration file can have any name the sysop chooses, but
  497.      it must reside  in the same directory as the  door.  The configuration
  498.      file is an ASCII text file with the following format:
  499.  
  500.      Line 1:   Door data file type.
  501.      Line 2:   Path to the door data file(s).
  502.      Line 3:   BBS name.
  503.      Line 4:   Sysop's name.
  504.      Line 5:   Locked baud rate.
  505.  
  506.      As illustrated above, the door's data file type is specified in line 1
  507.      and can be PCB for  PCBoard, GAP for GAP (DOOR.SYS), SF  for Spitfire,
  508.      RBBS  for RBBS, WC for WildCat!, TRIBBS  for TriBBS, or WWIV for WWIV.
  509.      The  locked baud rate  is specified in  line 5.   If the sysop doesn't
  510.      lock his  serial port, he  must specify  0 for the  locked baud  rate.
  511.      NOTE:  Although many door formats do pass  the locked baud rate in the
  512.      door  data  files, some  older  formats  such as  RBBS  do  not.   For
  513.      conformity,  TriDoor requires that you specify the locked baud rate in
  514.      line 5 and ignores any value passed in the door data files.
  515.  
  516.      The following is a sample door configuration file:
  517.  
  518.      TRIBBS
  519.      C:\TRIBBS\
  520.      The Lobster Buoy
  521.      Mark Goodwin
  522.      38400
  523.  
  524.      The "nonstandardirq"  parameter is used  to specify a  nonstandard IRQ
  525.      for the serial port.  The legitimate range of values is from 0 to 15.
  526.  
  527.      TriDoor can  be run locally  without a door  data file (handy  for the
  528.      sysop  to use the  door without logging  on to the  BBS) by specifying
  529.      LOCAL  after the configuration file parameter in the DOS command line.
  530.      TriDoor will request  the user  to enter his  name before running  the
  531.      door.
  532.  
  533.  
  534.  
  535.  
  536.  
  537.  
  538.  
  539.  
  540.  
  541.  
  542.  
  543.  
  544.  
  545.  
  546.  
  547.  
  548.  
  549.  
  550.  
  551.  
  552.      TriDoor                                                              4
  553.  
  554.                                   SPECIAL KEYS
  555.                                   ------------
  556.  
  557.      While a door is running,  the sysop can press certain special  keys to
  558.      perform a  variety of  functions.   The  following is  a  list of  the
  559.      functions that the TriDoor special keys perform:
  560.  
  561.      Key(s)              Function
  562.  
  563.      HOME                Toggles between the user  status window and a help
  564.                          display that lists the TriDoor special keys.
  565.  
  566.      F6                  Takes 5 minutes away from the caller.
  567.                          NOTE:  This will NOT be returned to BBS.
  568.  
  569.      F7                  Gives 5 minutes to the caller.
  570.                          NOTE:  This will NOT be returned to the BBS.
  571.  
  572.      F9                  Quit the door and return the caller to the BBS.
  573.  
  574.      F10                 Enter  chat mode.  Pressing the  ESC key exits the
  575.                          chat mode.
  576.  
  577.      Alt+D               Drop to DOS.
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.  
  602.  
  603.  
  604.  
  605.  
  606.  
  607.  
  608.  
  609.  
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618.  
  619.  
  620.      TriDoor                                                              5
  621.  
  622.                               THE TRIDOOR VARIABLES
  623.                               ---------------------
  624.  
  625.      The following are the  global variables that TriDoor supplies  for the
  626.      door author's convenience:
  627.  
  628.  
  629.      char TDAlias[81];
  630.  
  631.      The  TDAlias variable holds the  caller's alias.   Note: This variable
  632.      will be set to the user's name for PCB, RBBS, WC, and SF.
  633.  
  634.  
  635.      int TDAnsiColor;
  636.  
  637.      The  TDAnsiColor variable is  set to 1  for a caller  using ANSI color
  638.      graphics or to 0 for a monochrome caller.
  639.  
  640.  
  641.      long TDBaudRate;
  642.  
  643.      The  TDBaudRate variable  holds the caller's  baud rate.   This is the
  644.      caller's  actual connection rate and not the  locked baud rate.  NOTE:
  645.      TriDoor will set TDBaudRate to 0 for local calls.
  646.  
  647.  
  648.      char TDBBSName[81];
  649.  
  650.      The TDBBSName variable holds the BBS's name.
  651.  
  652.  
  653.      char TDCityState[81];
  654.  
  655.      The TDCityState variable holds  the user's city and  state.  This  may
  656.      not be supported  by all door formats and will be set to a null string
  657.      if not.
  658.  
  659.  
  660.      char TDDoorName[81];
  661.  
  662.      The TDDoorName variable holds  the door's name.  The door's  name will
  663.      be displayed in the user status window.  NOTE: It is the door author's
  664.      responsibility to assign a value to this variable.
  665.  
  666.  
  667.      void (*TDDropToDOS)(void);
  668.  
  669.      This is a pointer to a user-defined drop to DOS function.  This is not
  670.      required in order for  TriDoor to drop to DOS;  however, this function
  671.      is  a  hook so  that  the  door program  can  implement such  advanced
  672.      features as swapping the door out of memory, etc.
  673.  
  674.  
  675.  
  676.  
  677.  
  678.  
  679.  
  680.  
  681.  
  682.  
  683.  
  684.  
  685.  
  686.  
  687.  
  688.      TriDoor                                                              6
  689.  
  690.      int TDErrorCorrecting;
  691.  
  692.      The TDErrorCorrecting variable  will be set to 1 if  there is an error
  693.      correcting connection.   Otherwise, this variable will  be set to 0 to
  694.      indicate  a nonerror correcting connection.   Note: This variable will
  695.      be always be set to 0 for RBBS and WWIV.
  696.  
  697.  
  698.      int TDNode;
  699.  
  700.      The  TDNode variable  holds  the caller's  node  number.   Note:  This
  701.      variable will always be set to 1 for RBBS and WWIV.
  702.  
  703.  
  704.      long TDLockedBaudRate;
  705.  
  706.      The  TDLockedBaudRate variable  holds  the serial  port's locked  baud
  707.      rate, if any.
  708.  
  709.  
  710.      int TDMinutesLeft;
  711.  
  712.      The  TDMinutesLeft variable holds the number of minutes the caller had
  713.      remaining when he entered the door.
  714.  
  715.  
  716.      int TDNonStandardIRQ;
  717.  
  718.      The TDNonStandardIRQ variable holds  the number for a  nonstandard IRQ
  719.      if   one  was  passed  on   the  door's  command   line.    Otherwise,
  720.      TDNonStandardIRQ will be equal to 0.
  721.  
  722.  
  723.      char TDPhoneNumber[81];
  724.  
  725.      The  TDPhoneNumber variable holds the  user's phone number.   This may
  726.      not be supported by all door formats and will be set  to a null string
  727.      if not.
  728.  
  729.  
  730.      int TDSecurityLevel;
  731.  
  732.      The TDSecurityLevel variable holds the caller's security level.
  733.  
  734.  
  735.      int TDSerialPort;
  736.  
  737.      The TDSerialPort variable holds the number of the serial port.
  738.  
  739.  
  740.  
  741.  
  742.  
  743.  
  744.  
  745.  
  746.  
  747.  
  748.  
  749.  
  750.  
  751.  
  752.  
  753.  
  754.  
  755.  
  756.      TriDoor                                                              7
  757.  
  758.      char TDSysopName[81];
  759.  
  760.      The TDSysopName variable holds the sysop's name.
  761.  
  762.  
  763.      char TDUserFirstName[81];
  764.  
  765.      The TDUserFirstName variable holds the user's first name.
  766.  
  767.  
  768.      char TDUserName[81];
  769.  
  770.      The TDUserName variable holds the user's name.
  771.  
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798.  
  799.  
  800.  
  801.  
  802.  
  803.  
  804.  
  805.  
  806.  
  807.  
  808.  
  809.  
  810.  
  811.  
  812.  
  813.  
  814.  
  815.  
  816.  
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.      TriDoor                                                              8
  825.  
  826.                               THE TRIDOOR FUNCTIONS
  827.                               ---------------------
  828.  
  829.      The following is a explanation of the functions that TriDoor provides:
  830.  
  831.  
  832.      void TDBeepRemote(void);
  833.  
  834.      The TDBeepRemote will send a BELL (0x7) to the remote terminal only.
  835.  
  836.  
  837.      void TDClrScr(void);
  838.  
  839.      The TDClrScr function clears both the local and remote displays.
  840.  
  841.  
  842.      int TDDetectANSI(void);
  843.  
  844.      The  TDDetectANSI function will try  to detect if  the remote caller's
  845.      terminal supports  ANSI terminal emulation.   TDDetectANSI will return
  846.      TRUE  if it successfully detects ANSI  terminal emulation.  Otherwise,
  847.      the TDDetectANSI function will return FALSE.
  848.  
  849.  
  850.      int TDDetectRIPScrip(void);
  851.  
  852.      The  TDDetectRIPScrip function  will  try  to  detect  if  the  remote
  853.      caller's       terminal   supports    RIPScrip   graphics   emulation.
  854.      TDDetectRIPScrip will return TRUE  if it successfully detects RIPScrip
  855.      terminal emulation.   Otherwise,  the  TDDetectRIPScrip function  will
  856.      return FALSE.
  857.  
  858.  
  859.      void TDDisplayFile(char *file);
  860.  
  861.      The TDDisplayFile function displays  the file specified by the  "file"
  862.      parameter 22 lines at a time.
  863.  
  864.  
  865.      void TDDisplayBreakableFile(char *file);
  866.  
  867.      The TDDisplayBreakableFile function displays the file specified by the
  868.      "file" parameter 22 lines at a  time.  If the user presses <SPACE>  at
  869.      any time, TriDoor will skip displaying the remainder of the file.
  870.  
  871.  
  872.      int TDGetBackground(void);
  873.  
  874.      The TDGetBackground function returns the current background color.
  875.  
  876.  
  877.  
  878.  
  879.  
  880.  
  881.  
  882.  
  883.  
  884.  
  885.  
  886.  
  887.  
  888.  
  889.  
  890.  
  891.  
  892.      TriDoor                                                              9
  893.  
  894.      int TDGetch(void);
  895.  
  896.      The  TDGetch function  waits  for either  a  key to  be  pressed or  a
  897.      character to come  in through the serial port.  As soon as a character
  898.      is  available,  its value  will  be  returned  by  TDGetch.   Extended
  899.      keypresses are returned as 256 + the key's scan code.
  900.  
  901.  
  902.      int TDGetForeground(void);
  903.  
  904.      The TDGetForeground function returns the current foreground color.
  905.  
  906.  
  907.      char *TDGets(char *string, int length);
  908.  
  909.      The TDGets function returns a string that if entered either locally or
  910.      remotely.    The  string's location  is  pointed  to  by the  "string"
  911.      parameter.  The maximum string that TDGets will allow to be determined
  912.      by "length" - 1.
  913.  
  914.  
  915.      void TDGotoXY(int x, int y);
  916.  
  917.      The TDGotoXY procedure  positions the  cursor for both  the local  and
  918.      remote displays.  The cursor's new column position is specified by the
  919.      "x"  parameter  and its  new  row position  is  specified  by the  "y"
  920.      parameter.   NOTE: This will only  work if the user  has ANSI enabled.
  921.      TriDoor will ignore  this statement if called  when the user  does not
  922.      have ANSI enabled.
  923.  
  924.  
  925.      void TDInitialize(int argc, char *argv[]);
  926.  
  927.      The  TDInitialize   function  initializes  the  TriDoor   door  driver
  928.      routines.   This  function must  be called  before you  use any  other
  929.      TriDoor functions in your program.  You must  pass the main function's
  930.      argc and argv parameters to TDInitialize function's parameters.
  931.  
  932.  
  933.      int TDKeyPressed(void);
  934.  
  935.      The  TDKeyPressed function indicates if a key has been pressed locally
  936.      or a character has been  received remotely.  If a character  is ready,
  937.      the TDKeyPressed function will return a value of TRUE.  Otherwise, the
  938.      TDKeyPressed function will return  a value of FALSE to indicate that a
  939.      character isn't available.
  940.  
  941.  
  942.      void TDHangUp(void);
  943.  
  944.      The TDHangUp  function disconnects the  connection by first  trying to
  945.      drop the DTR  line.  If  that is  unsuccessful, the TDHangUp  function
  946.  
  947.  
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954.  
  955.  
  956.  
  957.  
  958.  
  959.  
  960.      TriDoor                                                             10
  961.  
  962.      will terminate the connection with an ATH0 command.
  963.  
  964.  
  965.      int TDPrintf(char *s, ...);
  966.  
  967.      The  TDPrintf function  acts identically  like the  C runtime  library
  968.      printf function except  it sends the output to both  the local display
  969.      screen and to the remote caller.
  970.  
  971.  
  972.      void TDPutch(int c);
  973.  
  974.      The  TDPutch  function  sends  the  character  specified  by  the  "c"
  975.      parameter to both the local display and to the remote caller.
  976.  
  977.  
  978.      void TDPuts(char *s);
  979.  
  980.      The TDPuts function sends the string specified by the "s" parameter to
  981.      both the local display and to the remote caller.
  982.  
  983.  
  984.      int TDSetColor(int f, int b); 
  985.  
  986.      The TDSetColor procedure sets the foreground color (the "f" parameter)
  987.      and the background  color (the "b"  parameter) for both the  local and
  988.      remote  displays.  NOTE: The colors will only be set if the caller has
  989.      ANSI color graphics enabled.  The foreground colors are as follows:
  990.  
  991.            0 - Black
  992.            1 - Blue
  993.            2 - Green
  994.            3 - Cyan
  995.            4 - Red
  996.            5 - Magenta
  997.            6 - Brown
  998.            7 - White
  999.            8 - Dark grey
  1000.            9 - Light blue
  1001.           10 - Light green
  1002.           11 - Light cyan
  1003.           12 - Light red
  1004.           13 - Light magenta
  1005.           14 - Yellow
  1006.           15 - Bright white
  1007.  
  1008.      The background colors are as follows:
  1009.  
  1010.            0 - Black
  1011.            1 - Blue
  1012.            2 - Green
  1013.            3 - Cyan
  1014.  
  1015.  
  1016.  
  1017.  
  1018.  
  1019.  
  1020.  
  1021.  
  1022.  
  1023.  
  1024.  
  1025.  
  1026.  
  1027.  
  1028.      TriDoor                                                             11
  1029.  
  1030.            4 - Red
  1031.            5 - Magenta
  1032.            6 - Brown
  1033.            7 - White
  1034.            8 - Black with blinking foreground
  1035.            9 - Blue with blinking foreground
  1036.           10 - Green with blinking foreground
  1037.           11 - Cyan with blinking foreground
  1038.           12 - Red with blinking foreground
  1039.           13 - Magenta with blinking foreground
  1040.           14 - Yellow with blinking foreground
  1041.           15 - White with blinking foreground
  1042.  
  1043.      The following constants are defined in TRIDOOR.H to  make it easier to
  1044.      specify color values:
  1045.  
  1046.            0 - BLACK
  1047.            1 - BLUE
  1048.            2 - GREEN
  1049.            3 - CYAN
  1050.            4 - RED
  1051.            5 - MAGENTA
  1052.            6 - BROWN
  1053.            7 - LIGHTGRAY
  1054.            8 - DARKGRAY
  1055.            9 - LIGHTBLUE
  1056.           10 - LIGHTGREEN
  1057.           11 - LIGHTCYAN
  1058.           12 - LIGHTRED
  1059.           13 - LIGHTMAGENTA
  1060.           14 - YELLOW
  1061.           15 - WHITE
  1062.  
  1063.  
  1064.      int TDTimeLeft(void);
  1065.  
  1066.      The TDTimeLeft function returns  the number of minutes the  caller has
  1067.      remaining.
  1068.  
  1069.  
  1070.      int TDTimeOn(void);
  1071.  
  1072.      The  TDTimeOn function returns the  number of minutes  that the caller
  1073.      has been in the door.
  1074.  
  1075.  
  1076.  
  1077.  
  1078.  
  1079.  
  1080.  
  1081.  
  1082.  
  1083.  
  1084.  
  1085.  
  1086.  
  1087.  
  1088.  
  1089.  
  1090.  
  1091.  
  1092.  
  1093.  
  1094.  
  1095.  
  1096.      TriDoor                                                             12
  1097.  
  1098.                      ADVANCED SERIAL COMMUNICATIONS ROUTINES
  1099.                      ---------------------------------------
  1100.  
  1101.      This  section documents  the advanced  serial  communications routines
  1102.      that TriDoor has to offer.   You should note that the use of  these is
  1103.      strictly optional.  By default,  the TDInitialize routine performs all
  1104.      of the  set up of the serial port and TriDoor will automatically close
  1105.      the  serial port  when  TriDoor exists  from  memory.   However,  door
  1106.      authors will probably find many uses for these routines for such doors
  1107.      as callback verifiers,  etc.  Basically, if you  don't have a specific
  1108.      reason for using these functions, stay away from them.   They are very
  1109.      low-level and 99% of all doors can be written just fine without them.
  1110.  
  1111.  
  1112.      void TDCommClose(void);
  1113.  
  1114.      The TDCommClose function closes a previously opened serial port.
  1115.  
  1116.  
  1117.      int TDCommGetch(void);
  1118.  
  1119.      The  TDCommGetch function returns  a character from  the serial port's
  1120.      buffer.
  1121.  
  1122.  
  1123.      int TDCommIsCarrier(void);
  1124.  
  1125.      The  TDCommIsCarrier  function returns  TRUE  if  carrier is  present.
  1126.      Otherwise,  TDCommIsCarrier returns  FALSE  to  indicate that  carrier
  1127.      isn't present.
  1128.  
  1129.  
  1130.      int TDCommKeyPressed(void);
  1131.  
  1132.      The  TDCommKeyPressed function returns TRUE  if a key  is available in
  1133.      the serial  port's input buffer.   Otherwise, TDCommKeyPressed returns
  1134.      FALSE to indicate that carrier isn't present.
  1135.  
  1136.  
  1137.      void TDCommModemString(char *string);
  1138.  
  1139.      The TDCommModemString is used to send characters to the modem.  It has
  1140.      a slight delay between  characters, recognizes the <~> character  as a
  1141.      half-second delay, and recognizes any character preceded by a <^> as a
  1142.      control character (i.e., ^M would be a carriage return).
  1143.  
  1144.  
  1145.      void TDCommOpen(int port);
  1146.  
  1147.      The TDCommOpen function  is used  to open a  specified serial  "port".
  1148.      The serial port must be in the range of 1 to 4.  If a nonstandard  IRQ
  1149.      is to be  used, the  TDNonStandardIRQ must  be set  to an  appropriate
  1150.  
  1151.  
  1152.  
  1153.  
  1154.  
  1155.  
  1156.  
  1157.  
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163.  
  1164.      TriDoor                                                             13
  1165.  
  1166.      value.   NOTE:  The  TDCommOpen function  is  automatically opened  by
  1167.      TDInitialize; therefore, the TDCommOpen function should only be closed
  1168.      if  the door has  previously closed  the active  serial port  with the
  1169.      TDCommClose function.
  1170.  
  1171.  
  1172.      void TDCommPutch(int c);
  1173.  
  1174.      The TDCommPutch  function sends  the character  specified  by the  "c"
  1175.      parameter out the serial port.
  1176.  
  1177.  
  1178.      void TDCommPuts(char *string);
  1179.  
  1180.      The TDCommPuts  function sends  the string  specified by  the "string"
  1181.      parameter out the serial port.
  1182.  
  1183.  
  1184.      void TDCommSetBaudRate(long rate);
  1185.  
  1186.      The  TDCommSetBaudRate  function  sets  the  baud  rate  to the  speed
  1187.      specified by the "rate" parameter.
  1188.  
  1189.  
  1190.      void TDCommSetDataFormat(int bits, int parity, int stopbits);
  1191.  
  1192.      The TDCommSetDataFormat function sets  the serial port for the  number
  1193.      of bits  specified by the  "bits" parameter  (should be 7  or 8),  the
  1194.      parity  specified  by the  "parity"  parameter  (should be  NO_PARITY,
  1195.      EVEN_PARITY,  or ODD_PARITY), and the number of stop bits specified by
  1196.      the "stopbits" parameter (should be 0 or 1).
  1197.  
  1198.  
  1199.      void TDCommSetDTR(int flag);
  1200.  
  1201.      The TDCommSetDTR function is used  to set the serial port's DTR  line.
  1202.      The new  setting for the DTR line is specified by the "flag" parameter
  1203.      and can be either TRUE or FALSE.
  1204.  
  1205.  
  1206.      void TDCommSetFIFO(int trigger);
  1207.  
  1208.      The TDCommSetFIFO  function  sets the  interrupt trigger  level for  a
  1209.      16550 UART's FIFO buffers.  The trigger level can be set  for 1, 4, 8,
  1210.      or  14 and  is specified  as the  "trigger" parameter.   If  any other
  1211.      trigger level  is specified, the FIFO  buffers will be disabled.   You
  1212.      should note  that  this function  has  no effect  if the  serial  port
  1213.      doesn't have a 16550 UART.
  1214.  
  1215.  
  1216.  
  1217.  
  1218.  
  1219.  
  1220.  
  1221.  
  1222.  
  1223.  
  1224.  
  1225.  
  1226.  
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232.      TriDoor                                                             14
  1233.  
  1234.      void TDCommSetPort(long rate, int bits, int parity, int stopbits);
  1235.  
  1236.      The  TDCommSetPort function  sets the  serial port  for the  baud rate
  1237.      specified by the "rate" parameter, the number of bits specified by the
  1238.      "bits" parameter  (should be  7 or  8),  the parity  specified by  the
  1239.      "parity" parameter (should be  NO_PARITY, EVEN_PARITY, or ODD_PARITY),
  1240.      and  the number  of stop  bits specified  by the  "stopbits" parameter
  1241.      (should be 0 or 1).
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249.  
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260.  
  1261.  
  1262.  
  1263.  
  1264.  
  1265.  
  1266.  
  1267.  
  1268.  
  1269.  
  1270.  
  1271.  
  1272.  
  1273.  
  1274.  
  1275.  
  1276.  
  1277.  
  1278.  
  1279.  
  1280.  
  1281.  
  1282.  
  1283.  
  1284.  
  1285.  
  1286.  
  1287.  
  1288.  
  1289.  
  1290.  
  1291.  
  1292.  
  1293.  
  1294.  
  1295.  
  1296.  
  1297.  
  1298.  
  1299.  
  1300.      TriDoor                                                             15
  1301.  
  1302.                                      SUPPORT
  1303.                                      -------
  1304.  
  1305.      You  may obtain assistance with  a TriDoor related  problem by calling
  1306.      The Lobster Buoy at 207-941-0805.
  1307.  
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326.  
  1327.  
  1328.  
  1329.  
  1330.  
  1331.  
  1332.  
  1333.  
  1334.  
  1335.  
  1336.  
  1337.  
  1338.  
  1339.  
  1340.  
  1341.  
  1342.  
  1343.  
  1344.  
  1345.  
  1346.  
  1347.  
  1348.  
  1349.  
  1350.  
  1351.  
  1352.  
  1353.  
  1354.  
  1355.  
  1356.  
  1357.  
  1358.  
  1359.  
  1360.  
  1361.  
  1362.  
  1363.  
  1364.  
  1365.  
  1366.  
  1367.  
  1368.      TriDoor                                                             16
  1369.  
  1370.                                   REGISTRATION
  1371.                                   ------------
  1372.  
  1373.      Registration of  TriDoor is only $25.00.   Please use the  form in the
  1374.      file REGISTER.TXT.  When you register TriDoor, you will receive a disk
  1375.      with  registered  versions  the  TriDoor  libraries  for  all  of  the
  1376.      supported compilers.
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.  
  1393.  
  1394.  
  1395.  
  1396.  
  1397.  
  1398.  
  1399.  
  1400.  
  1401.  
  1402.  
  1403.  
  1404.  
  1405.  
  1406.  
  1407.  
  1408.  
  1409.  
  1410.  
  1411.  
  1412.  
  1413.  
  1414.  
  1415.  
  1416.  
  1417.  
  1418.  
  1419.  
  1420.  
  1421.  
  1422.  
  1423.  
  1424.  
  1425.  
  1426.  
  1427.  
  1428.  
  1429.